import Vue from 'vue'
import Router from 'vue-router'
import Layout from '@/page/Layout/layout'
import Home from '@/page/home'


Vue.use(Router)

export default new Router({
  routes: [
    {
        path: '/login',
        component: Home
    },
    {
    		path: '/',
        component: Layout,
        redirect: '/index',
        children: [{
            path: 'index',
            component: () => import('@/page/mainPage/MainPage'),
            name: 'mainPage'
        }]
    },
    {
        path: '/receiptList',
        component: Layout,
        redirect: '/receiptList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/receiptList/ReceiptList'),
            name: 'receiptList'
        }]
    },
    {
        path: '/receipt',
        component: () => import('@/page/receipt/Receipt'),
        name: 'receipt'
    },
    //青浦区发票收据
    {path: '/printQPQBill', component:  require('@/page/printQPQBill/printQPQBill').default,name: 'printQPQBill',},
    {
        path: '/paymentList',
        component: Layout,
        redirect: '/paymentList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/paymentList/PaymentList'),
            name: 'paymentList'
        }]
    },
    {
        path: '/payment',
        component: () => import('@/page/payment/Payment'),
        name: 'payment'
    },
    {
        path: '/receiptDetailList',
        component: Layout,
        redirect: '/receiptDetailList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/receiptDetailList/ReceiptDetailList'),
            name: 'receiptDetailList'
        }]
    },
    {
        path: '/paymentDetailList',
        component: Layout,
        redirect: '/paymentDetailList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/paymentDetailList/PaymentDetailList'),
            name: 'paymentDetailList'
        }]
    },
    {
        path: '/billList',
        component: Layout,
        redirect: '/billList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/billList/BillList'),
            name: 'billList'
        }]
    },
    {
        path: '/billDetailList',
        component: Layout,
        redirect: '/billDetailList/index',
        children: [{
            path: 'index',
            component: () => import('@/page/billDetailList/BillDetailList'),
            name: 'billDetailList'
        }]
    },
      {
          path: '/studentList',
          component: Layout,
          redirect: '/studentList/index',
          children: [{
              path: 'index',
              component: () => import('@/page/learnDemo/LearnDemoList'),
              name: 'learnDemoList'
          },{
              path: 'detail',
              component: () => import('@/page/learnDemo/LearnDemoDetail'),
              name: 'learnDemoDetail'
          }]
      },
      {
          path: '/practice',
          component: Layout,
          redirect: '/practice/index',
          children: [{
              path: 'index',
              component: () => import('@/page/practice/list'),
              name: 'list'
          },{
              path: 'detail',
              component: () => import('@/page/practice/detail'),
              name: 'detail'
          }]
      },
    {
      path: '*',
      redirect: '/'
    }
  ]
})
